import request from '@/utils/request'

// 查询优惠方案列表
export function listDiscount(query) {
  return request({
    url: '/house_sale/discount/list',
    method: 'get',
    params: query
  })
}

// 查询优惠方案详细
export function getDiscount(discountid) {
  return request({
    url: '/house_sale/discount/' + discountid,
    method: 'get'
  })
}

// 新增优惠方案
export function addDiscount(data) {
  return request({
    url: '/house_sale/discount',
    method: 'post',
    data: data
  })
}

// 修改优惠方案
export function updateDiscount(data) {
  return request({
    url: '/house_sale/discount',
    method: 'put',
    data: data
  })
}

// 删除优惠方案
export function delDiscount(discountid) {
  return request({
    url: '/house_sale/discount/' + discountid,
    method: 'delete'
  })
}
